let newUpdate=new Vue({
    el:'#main-container',
    data:{
        app:{
        }
    },
    methods:{
        selectOne:function(id){
            axios({
                url:`app/selectOne/${id}`
            }).then(response=>{
                this.app=response.data.obj;
            }).catch(error=>{
                console.log(error);
            })
        },
        doUpdate:function () {
            axios({
                url: "app/doUpdate",
                method:'put',
                data:this.app
            }).then(response=>{
                if(response.data.success){
                let index=parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
                parent.layer.message=response.data.obj
                }else {
                    layer.msg(response.data.msg)
                }
            }).catch(error=>{
                layer.msg(error)
            })
        },
        hiddenWindow:function () {
            let index=parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);
        }
    },
    created:function () {
        // this.app.id=parent.layer.appId;
        this.selectOne(parent.layer.appId)
    }
})